package order

import (
	"github.com/xinliangnote/go-gin-api/internal/pkg/core"	
	"github.com/xinliangnote/go-gin-api/internal/repository/mysql"	
	"github.com/xinliangnote/go-gin-api/internal/repository/mysql/order"	
	"github.com/xinliangnote/go-gin-api/internal/repository/redis"
)

var _ Service = (*service)(nil)

type Service interface {
	i()

	PageList(ctx core.Context, searchData *SearchData) (listData []*order.Order, err error)
	PageListCount(ctx core.Context, searchData *SearchData) (total int64, err error)
	Create(ctx core.Context, createData *CreateOrderData) (id int32, err error)
	Modify(ctx core.Context, id int32, modifyData *ModifyOrderData) (err error)
	Delete(ctx core.Context, id int32) (err error)
	Detail(ctx core.Context, searchOneData *SearchOneData) (info *order.Order, err error)
}

type service struct {
	db         mysql.Repo
	cache      redis.Repo	
}

func New(db mysql.Repo, cache redis.Repo) Service {
	return &service{
		db:         db,
		cache:      cache,
	}
}

func (s *service) i() {}
